using System;
using System.Collections.Generic;
using System.Text;
using Zsa.Reflection.Discovery;

namespace Zsa.Emulation.Render
{
    /// <summary>
    /// Used to create render settings and get device information.
    /// </summary>
    public static class RenderManager
    {
        /// <summary>
        /// Gets the default render. 
        /// </summary>
        /// <value>The default render.</value>
        public static RenderSettings DefaultRender
        {
            get
            {
                return new RenderSettings(
//                    new Video.Direct3d.Dx3dRenderCapabilities().DefaultSettings as Video.GraphicRenderSettings,
//                    new Video.Gdi.GdiRenderCapabilities().DefaultSettings,
                    new Video.DirectDraw.DirectDrawRenderCapabilities().DefaultSettings as Video.GraphicRenderSettings,
                    new Audio.DxSound.DxSoundCapabilities().DefaultSettings,
                    new Input.Win32.KeyboardInputCapabilities().DefaultSettings
                    );
            }
        }

        ///// <summary>
        ///// Gets the supported render capabilities on the machine by the device type.
        ///// </summary>
        ///// <param name="renderDeviceType">The device type.</param>
        ///// <returns>List of supported render capabilties support of the machine.</returns>
        //public static IList<RenderDeviceCapabilities> GetDeviceCapabilities ( RenderDeviceType renderDeviceType )
        //{
        //    // The type.
        //    Type _Type = null;
        //    // Get the default type based on the device type.
        //    switch (renderDeviceType)
        //    {
        //        case RenderDeviceType.Audio:
        //            _Type = typeof(Audio.SoundDeviceCapabilities);
        //            break;
        //        case RenderDeviceType.Input:
        //            _Type = typeof(Input.ControllerDeviceCapabilities);
        //            break;
        //        case RenderDeviceType.Video:
        //            _Type = typeof(Video.GraphicRenderCapabilities);
        //            break;
        //        default:
        //            throw new NotSupportedException();
        //    }

        //    TypeSearchCriteria _Criteria = new TypeSearchCriteria(
        //        new TypeSearchParameter(TypeSearchParameterType.InheiritsFrom,
        //        _Type));

        //    TypeSearch _TypeSearch = new TypeSearch(_Criteria);
        //    return null;
        //    //// Create the device.
        //    //try
        //    //{
        //    //    _Device = Activator.CreateInstance(_Type, new object[0]) as RenderDeviceCapabilities;
        //    //}
        //    //catch (Exception excep)
        //    //{
        //    //    throw excep;
        //    //}

        //    //return _Device;
        //}

        



    }
}
